package com.bdmc.alarm.domain.bo;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.bdmc.common.core.domain.BaseEntity;

import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 告警事件业务对象 alarm_event
 *
 * @author bdmc
 * @date 2022-03-10
 */

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class AlarmEventBo extends BaseEntity {

    /**
     * 事件id
     */
    private Long eventId;

    /**
     * person或car
     */
    private String targetType;

    /**
     * 报警规则类型
     */
    private String alarmType;

    /**
     * 车辆id
     */
    private Long carId;

    /**
     * 人员id
     */
    private Long personId;
    /**
     * 围栏id
     */
    private Long fenceId;
    /**
     * 排班计划详细id
     */
    private Long workPlanId;

    private Long workTeamId;
    /**
     * 事件开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime eventStart;

    /**
     * 事件结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime eventEnd;

    /**
     * 事件是否已结束，0=未结束，1=已结束
     */
    private Integer eventFinish;

    /**
     * 事件描述
     */
    private String eventDesc;

    /**
     * 持续时长 分钟
     */
    private Long persistTime;


    //部门
    private Long deptId;

    private String carNum;

    private String personName;

    private String workPlanName;

    private String workTeamName;
}
